package com.tju.resource.business.qr;

import com.tju.resource.result.Result;
import org.springframework.mobile.device.Device;

/**
 * 扫码
 *
 * @Author CLS
 * @Date 2022/4/1 13:39
 */
public interface ScanCodeService {
    /**
     * QR code
     *
     * @param device
     * @return
     */
    String qr(Device device);

    /**
     * Scan the code on the mobile terminal to verify whether the QR code matches
     *
     * @return
     */
    Result<Object> scanCodeOnMobile(String qrCodeData);

    /**
     * Web page polling to verify whether the scan code is successful
     *
     * @return
     */
    Result<Object> pollingQRCode(String qrCodeData);

    /**
     * Mobile terminal confirm web terminal login
     *
     * @param token
     * @return
     */
    Result<Object> confirmWebLogin(String token,String qrCodeData);
}
